# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Adria Arrufat <adria.arrufat@protonmail.ch>
pkgname=lasem
pkgver=0.4.4
pkgrel=2
pkgdesc="SVG and Mathml rendering library"
arch=('x86_64')
url="https://wiki.gnome.org/Projects/Lasem"
license=('LGPL')
depends=('gtk3')
makedepends=('intltool' 'python')
options=('!libtool')
source=(https://download.gnome.org/sources/$pkgname/${pkgver:0:3}/$pkgname-$pkgver.tar.xz
        CVE-2013-7447.patch)
sha256sums=('9bf01fcfdc913ebc05989ac1f5902d52e28e7c31f797e2b6d3d413d4b51bba39'
            'd9e836934655db45e52f6ab1923866a5010a071c1c62fcbcb6c2fd999e978d2c')

prepare() {
  cd $pkgname-$pkgver
  patch -Np1 -i ../CVE-2013-7447.patch
}

build() {
  cd "$pkgname-$pkgver"
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
      --disable-static
  make
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install
  mv "$pkgdir/usr/doc" "$pkgdir/usr/share/doc"
}
